using FluentNHibernate.Mapping;
using Wikey.Entity;

namespace Wikey.Domain.Mappings
{
    public class UserSpaceMap : ClassMap<UserSpace> {
        public UserSpaceMap() {
            Id(x => x.Id);

            Map(x => x.Watch);
            Map(x => x.Favourite);
            References(x => x.User).Column("UserId").Cascade.All();
            References(x => x.Space).Column("SpaceId").Cascade.All();

            Not.LazyLoad();
        }
    }
}